/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Dic;

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.UnsupportedEncodingException;

/**
 *
 * @author Pham Thanh
 */
public class Dic {
    public static void main(String argv[])throws FileNotFoundException, UnsupportedEncodingException, IOException{
        Dic dic=new Dic();
        dic.insertIntoDic();
    }

    public void insertIntoDic() throws FileNotFoundException, UnsupportedEncodingException, IOException{
        BufferedWriter bw=new BufferedWriter(new OutputStreamWriter(new FileOutputStream("dic\\amtiet.them.txt"), "UTF8"));
        BufferedReader br=new BufferedReader(new InputStreamReader(new FileInputStream("dic\\amtiet.txt"), "UTF8"));

        System.out.println("package Dic; class Dic");

        String line="";
        while((line=br.readLine())!=null){
            bw.write(line+"\n");
            System.out.println(line);
        }

        bw.write("nhuôn"+"\n");
        bw.write("xuối"+"\n");
        bw.write("thạt"+"\n");
        bw.write("ngụn"+"\n");
        bw.write("hệu"+"\n");
        bw.write("nhậng"+"\n");
        bw.write("thuột"+"\n");
        bw.write("đoòng"+"\n");
        bw.write("môi"+"\n");
        bw.write("công"+"\n");
        bw.write("sùa"+"\n");
        bw.write("thuấn"+"\n");
        bw.write("cần"+"\n");
        bw.write("sóc"+"\n");
        bw.write("nốt"+"\n");
        bw.write("tượng"+"\n");
        bw.write("láng"+"\n");
        bw.write("hinh"+"\n");
        bw.write("tỏa"+"\n");
        bw.write("giẽ"+"\n");
        bw.write("păng"+"\n");
        bw.write("séo"+"\n");
        bw.write("thàng"+"\n");
        bw.write("rại"+"\n");
        bw.write("ngân"+"\n");
        bw.write("kông"+"\n");
        bw.write("vy"+"\n");
        bw.write("xịn"+"\n");
        bw.write("tỏa"+"\n");
        bw.write("rụp"+"\n");
        bw.write("lộc"+"\n");
        bw.write("triểm"+"\n");
        bw.write("hằng"+"\n");
        bw.write("nhật"+"\n");
        bw.write("cở"+"\n");
        bw.write("tiền"+"\n");
        bw.write("võ"+"\n");
        bw.write("yên"+"\n");
        bw.write("bình"+"\n");
        bw.write("duẩn"+"\n");
        bw.write("thuy"+"\n");
        bw.write("kon"+"\n");
        bw.write("kan"+"\n");
        bw.write("miêng"+"\n");
        bw.write("khuyếch"+"\n");
        bw.write("my"+"\n");
        bw.write("giộng"+"\n");
        bw.write("mỳ"+"\n");
        bw.write("thy"+"\n");
        bw.write("kao"+"\n");
        bw.write("ngộp"+"\n");
        bw.write("hy"+"\n");
        bw.write("hỷ"+"\n");
        bw.write("hới"+"\n");
        bw.write("đóa"+"\n");
        bw.write("triểm"+"\n");
        bw.write("xéo"+"\n");
        bw.close();
        br.close();
    }

}
